Optimal. Leaf size=82 \[ -\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 82, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {473, 396, 223,
212} \begin {gather*} -\frac {a^2 \sqrt {c+d x^2}}{c x}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}}+\frac {b^2 x \sqrt {c+d x^2}}{2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 223
Rule 396
Rule 473
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^2}{x^2 \sqrt {c+d x^2}} \, dx &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {\int \frac {2 a b c+b^2 c x^2}{\sqrt {c+d x^2}} \, dx}{c}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {(b (b c-4 a d)) \int \frac {1}{\sqrt {c+d x^2}} \, dx}{2 d}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {(b (b c-4 a d)) \text {Subst}\left (\int \frac {1}{1-d x^2} \, dx,x,\frac {x}{\sqrt {c+d x^2}}\right )}{2 d}\\ &=-\frac {a^2 \sqrt {c+d x^2}}{c x}+\frac {b^2 x \sqrt {c+d x^2}}{2 d}-\frac {b (b c-4 a d) \tanh ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c+d x^2}}\right )}{2 d^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 79, normalized size = 0.96 \begin {gather*} \frac {\left (-2 a^2 d+b^2 c x^2\right ) \sqrt {c+d x^2}}{2 c d x}+\frac {b (b c-4 a d) \log \left (-\sqrt {d} x+\sqrt {c+d x^2}\right )}{2 d^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 87, normalized size = 1.06
method | result | size |
risch | \(-\frac {\sqrt {d \,x^{2}+c}\, \left (-b^{2} c \,x^{2}+2 a^{2} d \right )}{2 d c x}+\frac {2 a b \ln \left (x \sqrt {d}+\sqrt {d \,x^{2}+c}\right )}{\sqrt {d}}-\frac {b^{2} \ln \left (x \sqrt {d}+\sqrt {d \,x^{2}+c}\right ) c}{2 d^{\frac {3}{2}}}\) | \(86\) |
default | \(b^{2} \left (\frac {x \sqrt {d \,x^{2}+c}}{2 d}-\frac {c \ln \left (x \sqrt {d}+\sqrt {d \,x^{2}+c}\right )}{2 d^{\frac {3}{2}}}\right )+\frac {2 a b \ln \left (x \sqrt {d}+\sqrt {d \,x^{2}+c}\right )}{\sqrt {d}}-\frac {a^{2} \sqrt {d \,x^{2}+c}}{c x}\) | \(87\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 73, normalized size = 0.89 \begin {gather*} \frac {\sqrt {d x^{2} + c} b^{2} x}{2 \, d} - \frac {b^{2} c \operatorname {arsinh}\left (\frac {d x}{\sqrt {c d}}\right )}{2 \, d^{\frac {3}{2}}} + \frac {2 \, a b \operatorname {arsinh}\left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {d}} - \frac {\sqrt {d x^{2} + c} a^{2}}{c x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.27, size = 165, normalized size = 2.01 \begin {gather*} \left [-\frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {d} x \log \left (-2 \, d x^{2} - 2 \, \sqrt {d x^{2} + c} \sqrt {d} x - c\right ) - 2 \, {\left (b^{2} c d x^{2} - 2 \, a^{2} d^{2}\right )} \sqrt {d x^{2} + c}}{4 \, c d^{2} x}, \frac {{\left (b^{2} c^{2} - 4 \, a b c d\right )} \sqrt {-d} x \arctan \left (\frac {\sqrt {-d} x}{\sqrt {d x^{2} + c}}\right ) + {\left (b^{2} c d x^{2} - 2 \, a^{2} d^{2}\right )} \sqrt {d x^{2} + c}}{2 \, c d^{2} x}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 2.17, size = 155, normalized size = 1.89 \begin {gather*} - \frac {a^{2} \sqrt {d} \sqrt {\frac {c}{d x^{2}} + 1}}{c} + 2 a b \left (\begin {cases} \frac {\sqrt {- \frac {c}{d}} \operatorname {asin}{\left (x \sqrt {- \frac {d}{c}} \right )}}{\sqrt {c}} & \text {for}\: c > 0 \wedge d < 0 \\\frac {\sqrt {\frac {c}{d}} \operatorname {asinh}{\left (x \sqrt {\frac {d}{c}} \right )}}{\sqrt {c}} & \text {for}\: c > 0 \wedge d > 0 \\\frac {\sqrt {- \frac {c}{d}} \operatorname {acosh}{\left (x \sqrt {- \frac {d}{c}} \right )}}{\sqrt {- c}} & \text {for}\: d > 0 \wedge c < 0 \end {cases}\right ) + \frac {b^{2} \sqrt {c} x \sqrt {1 + \frac {d x^{2}}{c}}}{2 d} - \frac {b^{2} c \operatorname {asinh}{\left (\frac {\sqrt {d} x}{\sqrt {c}} \right )}}{2 d^{\frac {3}{2}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.02, size = 93, normalized size = 1.13 \begin {gather*} \frac {\sqrt {d x^{2} + c} b^{2} x}{2 \, d} + \frac {2 \, a^{2} \sqrt {d}}{{\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2} - c} + \frac {{\left (b^{2} c \sqrt {d} - 4 \, a b d^{\frac {3}{2}}\right )} \log \left ({\left (\sqrt {d} x - \sqrt {d x^{2} + c}\right )}^{2}\right )}{4 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.73, size = 125, normalized size = 1.52 \begin {gather*} \left \{\begin {array}{cl} \frac {-a^2+2\,a\,b\,x^2+\frac {b^2\,x^4}{3}}{\sqrt {c}\,x} & \text {\ if\ \ }d=0\\ \frac {2\,a\,b\,\ln \left (\sqrt {d}\,x+\sqrt {d\,x^2+c}\right )}{\sqrt {d}}+\frac {b^2\,x\,\sqrt {d\,x^2+c}}{2\,d}-\frac {a^2\,\sqrt {d\,x^2+c}}{c\,x}-\frac {b^2\,c\,\ln \left (2\,\sqrt {d}\,x+2\,\sqrt {d\,x^2+c}\right )}{2\,d^{3/2}} & \text {\ if\ \ }d\neq 0 \end {array}\right . \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________